<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
<title>合同列表</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link href="${ctx }/CSS/style.css" rel="stylesheet" type="text/css">
<body>
<table width="684" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="27" colspan="6" bgcolor="#EEEEEE" class="tableBorder_gray">
    &nbsp;<span  class="word_deepgrey"> 当前位置：商品销售> </span>合同列表 &gt;&gt;&gt;</td>
  </tr>
    <tr><td valign="top" height="83">
    	<form action="${ctx }/contactAction.do" method="post">
    	<input type="hidden" name="method" value="save">
	    <table width="98%" height="112"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#F2F2F2">
	    	<tr>
	    		<td width="140">合同编号</td><td width="400">合同名</td><td width="100">客户</td><td width="200">创建时间</td><td width="100">创建人</td><td width="100">状态</td><td width="200">操作</td>
	    	</tr>
	    	<c:forEach items="${contacts }" var="contact">
	    	<tr>
	    		<td>${contact.contactId }</td>
	    		<td>${contact.title }</td>
	    		<td>${contact.customer.customerName }</td>
	    		<td>${contact.contactTime }</td>
	    		<td>${contact.creator.name }</td>
	    		<td>${contact.stateDesc }</td>
	    		<td>
	    			<c:choose>
	    				<c:when test="${contact.state eq 0 }">
	    			<a href ="${ctx }/contactAction.do?method=changeState&state=1&id=${contact.contactId }">批准</a> 
	    			<a href="${ctx }/contactAction.do?method=changeState&state=2&id=${contact.contactId }">不批准</a>	
	    				</c:when>
	    				<c:otherwise>
	    				不用操作
	    				</c:otherwise>
	    			</c:choose>
	    		</td>
	    	</tr>
	    	</c:forEach>
		</table>
		</form>
	</td></tr>
</table>
</body>
</html>
